<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>SDJU Community</title>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="css/community.css">


</head>
<body class="body">
<div th:replace="navigation :: nav"></div>
<div class="container-fluid mian">
    <div class="row">
        <div class="col-lg-9 col-md-12 col-xs-12">
            <h2>
                <button type="button" class="btn btn-default btn-sm">
                    <span class="glyphicon glyphicon-question-sign"></span> 有问题大家说
                </button>
            </h2>
            <hr>
            <div class="media" th:each="questiondto : ${pagination.questionDTOS}">
                <div class="media-left">
                    <a href="#">
                        <img th:src="${questiondto.user.avatarUrl}" class="media-object" style="width:40px">
                    </a>
                </div>
                <div class="media-body">
                    <h4 class="media-heading" >
                        <a th:href="@{'/question/'+${questiondto.id}}" th:text="${questiondto.title}"></a>
                    </h4>
                    <p th:text="${questiondto.description}"></p>
                    <span class="font-des"><span th:text="${questiondto.viewCount}"></span>浏览·<span
                            th:text="${questiondto.commentCount}"></span>回复·<span
                            th:text="${#dates.format(questiondto.gmtCreate,'yyyy-MM-dd HH:mm:ss')}"></span></span>
                </div>
                <hr>
            </div>
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <li th:if="${pagination.showFirstPage}">
                        <a th:href="@{/(page=1)}" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li th:if="${pagination.showPrevisous}">
                        <a th:href="@{/(page=${pagination.page-1})}" aria-label="Previous">
                            <span aria-hidden="true">&lt;</span>
                        </a>
                    </li>
                    <li th:each="page:${pagination.pages}" th:class="${pagination.page==page}?'active':''">
                        <a th:href="@{/(page=${page})}" th:text="${page}"></a>
                    </li>
                    <li th:if="${pagination.showNextPage}">
                        <a th:href="@{/(page=${pagination.page+1})}" aria-label="Next">
                            <span aria-hidden="true">></span>
                        </a>
                    </li>
                    <li th:if="${pagination.showEndPage}">
                        <a th:href="@{/(page=${pagination.totalPage})}" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>

        </div>
        <div class="col-lg-3  col-md-12 col-xs-12">
            <h3>热门话题</h3>
            ～不要发一些无关紧要的问题<br>
            ～这是个技术问题社区
        </div>
    </div>
</div>

</body>
</html>